function checkout() {
    if (window.confirm("是否确认结账")){
        var cids="";
        var cidArr = document.getElementsByName("cid");
        for (var i = 0; i <cidArr.length ; i++) {
            var ckCid = cidArr[i];
            if (ckCid.checked){
                cids = cids +"_"+ckCid.value;
            }
        }
        if (cids && cids.length >0 && cids.substring(0,1) == "_"){
            cids = cids.substring(1);
        }
        window.location.href="cart.action?oper=checkout&cids="+cids;
    }
}